#include "DropletMarch/DropletMarch.h"

DropletMarch::DropletMarch(ObjectPhysicsData *objPhysics) 
	: IDroplet(objPhysics) 
{ return; }

DropletMarch::~DropletMarch() { return; }

void DropletMarch::DropletInit()
{
	ResetAllSystems();

	SetRGB(0, 0, 255);

	colorSet = 0;
	northMoved = 0;
	southMoved = 0;
}

void DropletMarch::DropletMainLoop()
{
	// Move North, then South
	if(northMoved == 0)
	{
		Move(2, NORTH);
		SetRGB(255, 0, 0);
		northMoved = 1;
	}

	else if(IsMoving() == 0 && southMoved == 0)
	{
		Move(2, SOUTH);
		SetRGB(0, 255, 0);
		southMoved = 1;
	}

	if(IsMoving() == 0 && northMoved > 0 && southMoved > 0 && colorSet == 0)
	{
		SetRGB(0, 0, 255);
		colorSet = 1;
	}
}